accesing module attributes

Hello,

 

Is it possible to read the value of a module attribute without opening this module ?

In my formal modules,  I've created a module attribute "Template" in which I write the 4 end caracters of the URL of the module from which I create these modules.

I tried to do so :

Folder f = current Folder
Item itm
Skip modSkip = createString

for itm in all f do {
    if (type itm == "Formal") put(modSkip, fullName(itm), itm)
}

for itm in modSkip do {
    Module m = module (itm)
    string Template = ""
    if (find (m, "Template Attribute" == true) Template = m."Template"
    else Template = "Nothing"
}

But as the module is not loaded, this don't work

Is it possible to create a module attribute readable without loading the module ?

 


Estebell - Mon Nov 14 11:05:52 EST 2016

Re: accesing module attributes
Mathias Mamsch - Mon Nov 14 11:55:36 EST 2016

You can use the ModuleProperties for this. See this discussion:

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014796210&ps=25

or the DXL manual. Regards, Mathias